#!/bin/bash

#
# cdiff -- by Dario Berzano <dario.berzano@gmail.com>
#
# Part of the lfscripts suite -- http://lfscripts.googecode.com/
#
# Colored diff that uses pygmentize to color the output
#

which pygmentize > /dev/null 2>&1
if [ $? != 0 ]; then
  echo "pygmentize not found in PATH"
  exit 1
fi

diff -upN "$1" "$2" | \
  iconv -f ASCII -t ASCII//TRANSLIT//IGNORE | \
  pygmentize -l diff
